"""
   -*- coding: utf-8 -*-
   @Time    : 2021/4/23 20:02
   @Author  : 狠欢
   @File    : lianxi.py
   @Software: PyCharm
"""
L = [('Bob', 75), ('Adam', 92), ('Bart', 66), ('Aarta', 75)]
# 先按成绩排，从高到低，再按名字升序排
print(sorted(sorted(L, key=lambda i: i[0]), key= lambda i:i[1],reverse=True))

print(sorted(L, key=lambda i: (-i[1], i[0])))